<%--
  Created by IntelliJ IDEA.
  User: 19296
  Date: 2021/10/24
  Time: 19:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>出入库记录</title>
    <link type="text/css" rel="stylesheet" href="fontsawesome/css/font-awesome.css"/>
    <link type="text/css" rel="stylesheet" href="css/datepicker.css"/>
    <link type="text/css" rel="stylesheet" href="css/style.css"/>
</head>
<body>
<div class="main_box">
    <h2><span></span>出入库记录</h2>
    <form action="${pageContext.request.contextPath}/recordsAllBy" method="post">
        <div class="search_box clearfix">
            <label class="f_left">出入库日期：</label>
            <div class="date_box">
                <input type="text" name="ptime" id="start_date"  readonly />
                <i class="fa fa-calendar"></i>
            </div>
<%--            <label class="f_left">结束日期：</label>--%>
<%--            <div class="date_box">--%>
<%--                <input type="text" name="ptime1" id="end_date" readonly/>--%>
<%--                <i class="fa fa-calendar"></i>--%>
<%--            </div>--%>

            <select class="f_left" name="ifrecord">
                <option value="null">全部记录</option>
                <option  value="1">入库记录</option>
                <option  value="2">出库记录</option>
            <input type="submit" value="搜索" class="btn blue_btn"/>
            </select>
        </div>
    </form>
    <div class="cont_box">
        <table border="0" cellspacing="0" cellpadding="0" class="table" id="table_box">
            <thead>
            <tr>
                <th>消耗品</th>
                <th>出入库记录</th>
                <th>出入库时间</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${list}" var="list">
                <tr>
                    <td>${list.pname}</td>
                    <td>
                        <c:if test="${list.ifrecord==1}">
                            入库:${list.stock}<!--入库-->
                        </c:if>
                        <c:if test="${list.ifrecord==2}">
                            出库:${list.record}<!--出库-->
                        </c:if>
                    </td>
                    <td>
                        <c:if test="${list.ifrecord==1}">
                            入库时间:${list.ptime}<!--入库-->
                        </c:if>
                        <c:if test="${list.ifrecord==2}">
                            出库时间:${list.ptime}<!--出库-->
                        </c:if>
                    </td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
    </div>
</div>
<!--javascript include-->
<script src="js/jquery-2.2.1.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/jquery.validate.min.js"></script>
<script src="js/bootstrap-datepicker.js"></script>
<script src="js/other.js"></script>
<script>
    $(function(){
        $("body").other({tableId:"#table_box",tableAas:[ 0,"desc"]});
    });
</script>
</body>
</html>
